package com.topscore.uke.mvp.contractors;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.squareup.timessquare.MonthView;
import com.topscore.uke.entities.MyPerformanceData;
import com.topscore.uke.entities.MyPerformanceSummaryData;
import com.topscore.uke.entities.PerformanceChartsEntity;
import com.topscore.uke.entities.SalesRankingItem;
import com.topscore.uke.mvp.BaseContractor;
import com.topscore.uke.mvp.model.BaseHttpListener;
import com.topscore.uke.mvp.views.BaseView;
import com.topscore.uke.network.BaseResponse;
import com.topscore.uke.network.retrofit.ApiService;
import com.topscore.uke.network.retrofit.NetClient;
import com.topscore.uke.network.retrofit.NetClientPostJson;

import java.util.List;

import lecho.lib.hellocharts.model.ComboLineColumnChartData;

/**
 * Created by 71468 on 2017/10/30.
 */

public interface GetMyPerformanceContractor extends BaseContractor {
    interface Model {
        ApiService mService = NetClientPostJson.getInstance().net().create(ApiService.class);

        void getPerformanceData(String userId);

        void getSalesRankList(String userId, String sortName);

        void getData(String userId);
    }

    interface View extends BaseView {

//        void onGetChartDataSuccess(List<PerformanceChartsEntity> salesCountsEntities, List<PerformanceChartsEntity> salesAmountEntities);

        void onGetChartDataSuccess(ComboLineColumnChartData lineColumnChartData);

        void onGetTotalSalesCountSuccess(String salesCount);

        void onGetTotalSalesAmountSuccess(String salesAmount);

        void onGetTotalReturnCountSuccess(String returnCount);

        void onGetTotalReturnAmountSuccess(String returnAmount);

        BaseQuickAdapter getRankingAdapter();

        void onGetRankListSuccess(List<SalesRankingItem> rankingList);
    }

    interface Presenter {
        void getMyPerformanceData();

        void getRankListData(String sortName);

        void getSalesData();
    }

    interface CallBack extends BaseHttpListener{
        void onGetChartDataSuccess(BaseResponse<MyPerformanceData> response);
        void onGetSummarySuccess(BaseResponse<MyPerformanceSummaryData> response);
        void onGetRankListDataSuccess(BaseResponse<List<SalesRankingItem>> response);
    }
}
